package cn.gcjxsc.consts;

/**
 * 充值通道.
 *
 * @author pumbaa
 * @since 1.0
 */
public enum RechargeChannel {
    /**
     * 微信
     */
    WE_CHAT,
    /**
     * 支付宝
     */
    ALIPAY;

    public static RechargeChannel fromCode(String channel) {
        RechargeChannel[] values = RechargeChannel.values();
        for (RechargeChannel value : values) {
            if (value.name().equalsIgnoreCase(channel)) {
                return value;
            }
        }
        return null;
    }
}
